
import request from '@/config/axios/index2'
export function login(params: object = {}) {
  return request.post({
    url: '/login',
    data: params,
  })
}

export function register(params: object = {}) {
  return request.post({
    url: '/register',
    data: params,

  })
}

export function o2Authorize(params: object = {}) {
  return request.post(
    {
      url: '/o2/authorize',
      data: params,
    }
  )
}

export function getRegionOptions() {
  return request.get({
    url: '/api/common/regionOptions',

  })
}

export function userAuthInfo() {
  return request.get({
    url: '/api/userAuthInfo',

  })
}

export function monitorSeller(params: object = {}) {
  return request.post({
    url: '/api/user/monitor',
    data: params,

  })
}

export function monitorList(params: object = {}) {
  return request.get({
    url: '/api/user/monitorList',
    params: params,

  })
}

export function cancelMonitor(id: string = '') {
  return request.post({
    url: `/api/user/cancelMonitor/${id}`,

  })
}

export function runningMonitor(id: string = '') {
  return request.post({
    url: `/api/user/runningMonitor/${id}`,

  })
}

export function getMonitor(sellerId: string = '') {
  return request.get({
    url: `/api/user/monitor/${sellerId}`,

  })
}

export function getSeller(sellerId: string = '') {
  return request.get({
    url: `/api/user/seller/${sellerId}`,

  })
}

export function getSellerProduct(sellerId: string = '', params: object = {}) {
  return request.get({
    url: `/api/user/sellerProduct/${sellerId}`,
    params: params,

  })
}

export function getSellerProductSalesKeep(sellerId: string = '') {
  return request.get({
    url: `/api/user/sellerProductSalesKeep/${sellerId}`,

  })
}

export function sellerSearch(params: object = {}) {
  return request.post({
    url: `/api/user/sellerSearch`,
    data: params,

  })
}

export function productSearch(params: object = {}) {
  return request.post({
    url: `/api/user/productSearch`,
    data: params,

  })
}

export function getProduct(bsId: string = '') {
  return request.get({
    url: `/api/user/product/${bsId}`,

  })
}

export function getProductSalesKeep(productId: string = '') {
  return request.get({
    url: `/api/user/productSalesKeep/${productId}`,

  })
}

export function storeAuthorizeList(params: object = {}) {
  return request.get({
    url: `/api/user/storeAuthorizeByPage`,
    params: params,

  })
}

export function preStoreAuthorize() {
  return request.get({
    url: `/api/user/preStoreAuthorize`,

  })
}

export function storeAuthorize(params: object = {}) {
  return request.post({
    url: `/api/user/storeAuthorize`,
    data: params,

  })
}

export function getStoreAuthorizeUrl(storeId: string) {
  return request.get({
    url: `/api/user/getStoreAuthorizeUrl/${storeId}`,

  })
}

export function findStoreByNotPage() {
  return request.get({
    url: `/api/user/findStoreByNotPage`,

  })
}

export function preSubmitListingTemplate() {
  return request.get({
    url: `/api/user/preSubmitListingTemplate`,

  })
}

export function searchProductTypes(params: object = { itemName: '', templateId: '' }) {
  return request.get({
    url: `/api/user/searchProductTypes`,
    params: params,

  })
}

export function preSubmitListing(params: object = {}) {
  return request.post({
    url: `/api/user/preSubmitListing`,
    data: params,
  })
}

export function saveSubmitListing(params: object = {}) {
  return request.post({
    url: `/api/user/saveSubmitListing`,
    data: params,

  })
}

export function preSubmitListingCount() {
  return request.get({
    url: `/api/user/preSubmitListingCount`,

  })
}

export function deleteSubmitListing(id: string) {
  return request.delete({
    url: `/api/user/submitListing/${id}`
  })
}

export function deleteSubmitListingAll(params) {
  return request.delete({
    url: `/api/user/submitListing/del`,
    data: params
  })
}

export function preSubmitListingPage(params: object = {}) {
  return request.get({
    url: `/api/user/preSubmitListingPage`,
    params: params
  })
}

export function submitListingPage(params: object = {}) {
  return request.get({
    url: `/api/user/submitListingPage`,
    params: params,

  })
}
export function productSubmitListing(params: object = {}) {
  return request.post({
    url: `/api/user/productSubmitListing`,
    data: params,

  })
}

export function listingTemplateByPage(params) {
  return request.get({
    url: `/api/user/listingTemplateByPage`,
    params: params,
  })
}
export function listingTemplate(params: object = {}) {
  return request.post({
    url: `/api/user/listingTemplate`,
    data: params,

  })
}

export function listingTemplateNotPage() {
  return request.get({
    url: `/api/user/listingTemplateNotPage`
  })
}

export function getListingTemplate(id: string) {
  return request.get({
    url: `/api/user/listingTemplate/${id}`,

  })
}

export function deleteListingTemplate(id: string) {
  return request.get({
    url: `/api/user/listingTemplate/${id}`,
    method: 'delete',
  })
}

export function singleProduct(params: object = {}) {
  return request.post({
    url: `/api/user/singleProduct`,
    data: params,

  })
}

export function submitListing(params: object = {}) {
  return request.post({
    url: `/api/user/submitListing`,
    data: params,
  })
}


export function editsubmitListing(params) {
  return request.get({
    url: `/api/user/editSubmitListing`,
    params: params
  })
}

export function batchsubmitListing(params) {
  return request.post({
    url: `/api/user/batchSubmitListing`,
    data: params
  })
}
export function collectedProductsListingApi(params) {
  return request.post({
    url: `/api/user/collectedProductsListing`,
    data: params
  })
}



